package kr.hkit.androidcomplete02.ch16;

import kr.hyunist.androidcomplete01.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class TouchOutsideEx extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch16_dialog);
	}
	
	public void mOnClick(View v) {
		AlertDialog dialog = new AlertDialog.Builder(this)
		.setTitle("잘봐봐~")
		.setIcon(R.drawable.androboy).setMessage("닫아!")
		.setCancelable(false)
		.create();
		
		dialog.setCanceledOnTouchOutside(true);
		dialog.show();
		
	}
}
